package com.zhuss.core.db.dao.ext;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.core.role.DeleteRolePermissionBo;
import com.zhuss.core.db.dao.gen.RolePermissionMapper;
import com.zhuss.core.db.entity.RolePermission;

@Mapper
public interface RolePermissionDao extends RolePermissionMapper {

	List<RolePermission> listPermission(@Param("roleIdList") List<Long> roleIdList);
	
	List<Long> listPermissionId(@Param("roleIdList") List<Long> roleIdList);

	List<RolePermission> listRole(@Param("permissionId") Long permissionId);
	
	void create(RolePermission record);

	void deleteByRolePermission(@Param("bo") DeleteRolePermissionBo bo, @Param("roleId") Long roleId, @Param("permissionIdList") List<Long> permissionIdList);
	
	void deleteByPermissionRole(@Param("bo") DeleteRolePermissionBo bo, @Param("permissionId") Long permissionId, @Param("roleIdList") List<Long> roleIdList);
    
}